package Vista;
import java.awt.BorderLayout;
import java.awt.LayoutManager;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import Modelo.Tiempo;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Registrar extends javax.swing.JFrame {
	private JPanel jPanel1;
	private JButton jButtoncancelar;
	private JButton Aceptar;
	private JLabel jLabelnombre;
	private JTextField jTextFieldnomre;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				Registrar inst = new Registrar();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public Registrar() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setName("Registrar Jugador\r\n");
			{setTitle("Registrar Jugador");
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1, BorderLayout.NORTH);
				LayoutManager jPanel1Layout;
			//	jPanel1.setLayout(jPanel1Layout);
				jPanel1.setPreferredSize(new java.awt.Dimension(311, 221));
				jPanel1.setLayout(null);
				jPanel1.setBackground(new java.awt.Color(153,183,251));
				{
					jTextFieldnomre = new JTextField();
					jPanel1.add(jTextFieldnomre);
					jTextFieldnomre.setBounds(110, 77, 77, 21);
				}
				{
					jLabelnombre = new JLabel();
					jPanel1.add(jLabelnombre);
					jLabelnombre.setText("Nombre:");
					jLabelnombre.setBounds(43, 80, 63, 14);
					jLabelnombre.setBackground(new java.awt.Color(0,0,255));
					jLabelnombre.setFont(new java.awt.Font("Verdana",1,10));
					jLabelnombre.setForeground(new java.awt.Color(0,0,255));
				}
				{
					Aceptar = new JButton();
					getContentPane().add(Aceptar);
					jPanel1.add(Aceptar);
					Aceptar.setText("Aceptar");
					Aceptar.setBounds(43, 143, 98, 25);
					Aceptar.setBackground(new java.awt.Color(128,128,128));
					Aceptar.setFont(new java.awt.Font("Verdana",1,10));
					
					//Aceptar.setActionCommand("Aceptar");
					Aceptar.setActionCommand("Aceptar");
				//	Aceptar.addActionListener(c);
				}
				{
					jButtoncancelar = new JButton();
					getContentPane().add(jButtoncancelar);
					jPanel1.add(jButtoncancelar);
					jButtoncancelar.setText("Cancelar");
					jButtoncancelar.setBounds(146, 143, 98, 26);
					jButtoncancelar.setBackground(new java.awt.Color(128,128,128));
					jButtoncancelar.setFont(new java.awt.Font("Verdana",1,10));
				}
			}
			pack();
			this.setSize(319, 265);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

	public void addListener(ActionListener actionListener) {
		Aceptar.addActionListener(actionListener);
		jButtoncancelar.addActionListener(actionListener);		
	}
	public void mostrarMensaje(String mensaje) {
		JOptionPane.showMessageDialog(this, mensaje);
	}
	
	

	public String getNombre() {
		return jTextFieldnomre.getText();
	}
	
	public int getNroIntentos(){
		return 0;
		
	}

	public Tiempo  getTiempo(){
		return null;
		
	}
		
	public void borrarDatos()
	{
		//txtCedula.setText("");
		jTextFieldnomre.setText("");
		//txtApellido.setText("");
		//txtEdad.setText("");		
	}
	

}
